package com.loren.demo03.tcp2.handler;

import com.loren.demo03.tcp2.protocol.MsgProtocol;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;

public class EncoderHandler extends MessageToByteEncoder<MsgProtocol> {
    @Override
    protected void encode(ChannelHandlerContext ctx, MsgProtocol msg, ByteBuf out) {
        msg.write(out);
    }
}
